#ifndef BOOK_H
#define BOOK_H
#include<iostream>
#include<vector>
using namespace std;
namespace LB
{
class Book
{	
public:
	int m_bid;				//bookid
	char m_bookname[20];	//book name
	bool at_library;		//在馆状态
	int restday;			//剩余天数
	int borrowid;			//借书人id
	int orderid;			//预定人id
	float praise_val;		//好评值
	int borrow_times;		//借阅次数
	vector<string> v_comment;//评论

	friend ostream& operator<<(ostream& os,const Book& that);
	Book(int m_bid=0,const char* m_bookname=" ");
	Book(int m_bid,const char* m_bookname,bool at_library,int restday,
		 int borrowid,int orderid,float praise_val,int borrow_times,vector<string> v_comment);
	Book(const Book& that);	
	void operator = (const Book&that);
	bool operator<(const Book& that) const;
	bool operator==(const Book& that)const;
	void showbook(void);
	void insertcomment(int id,const char* comment);
	void showcomment(void);
	bool findkey(char* keyword);
};
}

#endif